#ifndef LOGINPAGE_H
#define LOGINPAGE_H

//#include "request.h"
#include "loginrequest.h"
#include "dishrequest.h"
#include "foodcontroller.h"
//#include "requesttest.h"
#include <QNetworkReply>
#include <QWidget>
#include <QNetworkAccessManager>


namespace Ui {
class loginPage;
}

class loginPage : public QWidget
{
    Q_OBJECT

public:
    explicit loginPage(QWidget *parent = nullptr);
    ~loginPage();
    QNetworkAccessManager *accessManager;
    QNetworkRequest request;
    QByteArray postData;
    QNetworkReply* reply;
    uint code;
    //requesttest rt;
    //LoginRequest m_lr;


private slots:
    void on_loginBtn_clicked();

    void on_visitorBtn_clicked();

    void finishedSlot(QNetworkReply *reply);
signals:
    void sendLoginSuccess();

private:
    Ui::loginPage *ui;
    //Request *m_r;
    LoginRequest *m_lr;
    DishRequest *m_dr;
    FoodController *m_fc;
};

#endif // LOGINPAGE_H
